package com.naiterui.ehp.ps.push.bean;

import java.util.List;

import org.springframework.data.annotation.Id;

import lombok.Data;

/**
 * push失败记录
 *
 * @author Ldl
 * @date 2018/11/15 11:30
 * @since 1.0.0
 */
@Data
public class FailPushRecord {

    /**
     * 发送失败
     */
    public static final int SEND_RESULT_CODE_FAIL = 1;
    /**
     * 未知发送结果
     */
    public static final int SEND_RESULT_CODE_UNKNOW = 2;

    /**
     * 单个发送
     */
    public static final int QUANTITY_TYPE_SINGLE = 1;

    /**
     * 批量发送
     */
    public static final int QUANTITY_TYPE_BATCH = 2;

    /**
     * 全部发送
     */
    public static final int QUANTITY_TYPE_ALL = 3;

    /**
     * android
     */
    public static final int PUSH_PLATFORM_ANDROID = 1;
    /**
     * iOS
     */
    public static final int PUSH_PLATFORM_IOS = 2;

    @Id
    private String id;

    private String pushId;

    private Integer pushSeq;

    /**
     * 发送数量类型 1-单个,2-批量
     */
    private Integer quantityType;

    private String token;

    private Long userId;

    /**
     * 发送失败的tokenList
     */
    private List<String> tokenList;

    /**
     * 发送结果编码
     */
    private String resultCode;

    private Long createAt;

    /**
     * 补发次数
     */
    private Integer reSendTimes;

    /**
     * 失败平台 1-android 2-ios
     */
    private Integer platform;

    private PushParams pushParams;

}
